package com.skyworth.web.order.repository;

import com.skyworth.web.order.domain.OrderNotifyModel;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by skyworth on 2016/6/23.
 */
public interface OrderNotifyRepository extends CrudRepository<OrderNotifyModel,Long> {


    @Query(value = "SELECT * FROM ff_order_notify WHERE create_date>?1 GROUP BY order_id,type",nativeQuery = true)
    List<OrderNotifyModel> getLastByTableId(String createDate);

}
